/**
 * Copyright 2007 Igor Chaves Cananéa
 *
 * This file is part of PBSFW
 *
 * PBSFW is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * PBSFW is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef _SIMULATOR_INTERFACE_H_
#define _SIMULATOR_INTERFACE_H_

#include "defines.h"

namespace pbsfw {
    class Process;
    class SimulatorInterface {
        public:
            virtual ~SimulatorInterface()  {}

            virtual void activate(Process &p, simtime_t at = -1.0) = 0;
            virtual void passivate(Process &p) = 0;
            virtual void reactivate(Process &p, simtime_t at = -1.0) = 0;
            virtual void run(uint32_t replications, simtime_t until = INFINITE_TIME) = 0;
            virtual simtime_t now() const = 0;
    };

    #ifndef _CORE_SIMULATOR_
        #ifndef _INTERNAL_CLASS_
            extern SimulatorInterface &simulator;
        #endif
    #endif

};

#endif
